From 9f9ebc8e5d4dec0281b4992be5f315af415ffc8d Mon Sep 17 00:00:00 2001 From: Knight Date: Fri, 6 May 2016 20:00:51 +0800 Subject: [PATCH] zsh: enable autocompletion for sub-command `init` --- src/etc/_cargo | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/etc/_cargo b/src/etc/_cargo index 30738ed56..4e03ba77f 100644 --- a/src/etc/_cargo +++ b/src/etc/_cargo @@ -113,6 +113,17 @@ case $state in '*: :_cargo_cmds' \ ;; + init) + _arguments \ + '--bin[use binary template]' \ + '--vcs:initialize a new repo with a given VCS:(git hg none)' \ + '(-h, --help)'{-h,--help}'[show help message]' \ + '--name=[set the resulting package name]' \ + '(-q, --quiet)'{-q,--quiet}'[no output printed to stdout]' \ + '(-v, --verbose)'{-v,--verbose}'[use verbose output]' \ + '--color=:colorization option:(auto always never)' \ + ;; + install) _arguments \ '--bin=[only install the specified binary]' \ @@ -358,6 +369,7 @@ local -a commands;commands=( 'generate-lockfile:create lockfile' 'git-checkout:git checkout' 'help:get help for commands' +'init:create new project in current directory' 'install:install a Rust binary' 'locate-project:print "Cargo.toml" location' 'login:login to remote server' -- 2.30.2